package com.wangtongxiao.beans;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class MyApp3 {
    public static void main(String[] args) {
        String temp = "";
        String path = "d:\\abc.txt";
        try {
            FileReader fileReader = new FileReader(path);

            BufferedReader bufferedReader = new BufferedReader(fileReader);
            StringBuffer stringBuffer = new StringBuffer();
            String aaa="";
            while ((aaa = bufferedReader.readLine())!=null){
                stringBuffer.append(aaa);
                stringBuffer.append("\n");

            }
            temp=stringBuffer.toString();
            bufferedReader.close();
            fileReader.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
        System.out.println(temp);

    }
}
